// 弹窗
function myAlert(message){
    var mask = document.createElement("div");
    mask.className = "mask";
    
    var str = '';
    str += '    <div class="content">';
    str += '        <p><span>'+message+'</span> </p>';
    str += '        <div>';
    str += '            <button>好的</button>';
    str += '        </div>';
    str += '    </div>';

    mask.innerHTML = str;
    document.body.appendChild(mask);

    mask.onclick = function (event) {
        var btnSure = event.target;
        if (btnSure.localName = "button") {
            document.body.removeChild(mask);
            // location.reload();
            snake.handleReset();
        }
    }
}
